package project;

public class StockInfo {
	private Double lastTrade = null;
	private Double open = null;
	private Double close = null;
	private Double high = null;
	private Double low = null;
	private Integer volume = null;
	private Double change = null;
	private Double pe = null;
	private Double eps = null;
	
	StockInfo(Double lt, Double c, Integer v){
		this.lastTrade = lt;
		this.change = c;
		this.volume = v;
	}
	
	StockInfo(Double o, Double c, Double h, Double l, Integer v, Double ch, Double p, Double e){
		this.open = o;
		this.close = c;
		this.high = h;
		this.low = l;
		this.volume = v;
		this.change = ch;
		this.pe = p;
		this.eps = e;
	}
	
	public Double getLastTrade(){return lastTrade;}
	public Double getOpen(){return open;}
	public Double getClose(){return close;}
	public Double getHigh(){return high;}
	public Double getLow(){return low;}
	public Integer getVolume(){return volume;}
	public Double getChange(){return change;}
	public Double getPE(){return pe;}
	public Double getEPS(){return eps;}
	
	public void setLastTrade(Double i){this.lastTrade = i;}
	public void setOpen(Double i){this.open = i;}
	public void setClose(Double i){this.close = i;}
	public void setHigh(Double i){this.high = i;}
	public void setLow(Double i){this.low = i;}
	public void setVolume(Integer i){this.volume = i;}
	public void setChange(Double i){this.change = i;}
	public void setPE(Double i){this.pe = i;}
	public void setEPS(Double i){this.eps = i;}
	
	/**
	 * Displays the current values parsed from the website onto the console
	 */
	public void showCurrentValues(){
		System.out.println("Last trading price: " + lastTrade);
		System.out.println("Last trading volume: " + volume);
	}
	
	/**
	 * Displays the final values of the day parsed from the website onto the console
	 */
	public void showFinalValues(){
		System.out.println("Opening price: " + open);
		System.out.println("Closing price: " + close);
		System.out.println("Highest trading price: " + high);
		System.out.println("Lowest trading price: " + low);
		System.out.println("Last trading volume: " + volume);
		System.out.println("Total change: " + change);
		System.out.println("PE: " + pe);
		System.out.println("EPS: " + eps);
	}

}
